@layout("/common/_curd/_container.html"){
<style>
	.ui-jqgrid tr.jqgrow td {
		white-space: normal !important;
		height: 60px;
		line-height: 60px;
		vertical-align: text-top;
		padding-top: 2px;
	}

	.ui-jqgrid-sortable {
		font-size: 14px;
	}

	.ui-jqgrid .ui-jqgrid-htable th div {
		overflow: hidden;
		position: relative;
		height: 50px;
		line-height: 30px;
	}

	.btn-xs, .btn-group-xs > .btn {
		padding-top: 3px;
		padding-bottom: 3px;
		border-width: 1px;
		border-radius: 5px;
	}

	.well-sm {
		padding: 5px 5px 5px 1px;
		border-radius: 3px;
	}

	.welljq {
		min-height: 20px;
		padding: 1px;
		margin-bottom: 1px;
		background-color: #ffffff;
		border: none !important;
		box-shadow: none;
	}

	.ui-jqgrid .ui-jqgrid-htable th {
		height: 22px;
		background: #ffffff;
		padding: 0 2px 0 2px;
	}

</style>
<script type="text/javascript">
	var ctx = "${basePath}";
	var grid_selector = "#grid-table";
	var pager_selector = "#grid-pager";
	
	$(function(){
		initGrid();
		initMenuBtn("btns", "${code}");
	});
	
	function initGrid(){
		var grid_url = ctx + "/${code}/list";
		var _colnames = ["订单号", 
						"用户ID", 
						"用户名", 
						"电话", 
						"取货地址", 
						"购买数量", 
						"订单金额", 
						"是否支付成功", 
						"创建时间", 
						"支付成功时间", 
						"商品编号", 
						"商品标题", 
						"商品图片", 
						"状态1已下单2已付款3已收货", 
						"取货时间", 
						"生产厂家", 
						"单价"];
		var _colmodel = [{name:"id", index:"id", width:100},
						{name:"u_id", index:"u_id", width:100},
						{name:"u_name", index:"u_name", width:100},
						{name:"u_tel", index:"u_tel", width:100},
						{name:"address", index:"address", width:100},
						{name:"num", index:"num", width:100},
						{name:"total_fee", index:"total_fee", width:100},
						{name:"is_pay", index:"is_pay", width:100},
						{name:"addtime", index:"addtime", width:100},
						{name:"pay_time", index:"pay_time", width:100},
						{name:"g_id", index:"g_id", width:100},
						{name:"g_title", index:"g_title", width:100},
						{name:"g_cover", index:"g_cover", width:100},
						{name:"status", index:"status", width:100},
						{name:"quhuo_time", index:"quhuo_time", width:100},
						{name:"g_industry", index:"g_industry", width:100},
						{name:"g_price", index:"g_price", width:100}];
		
		jQuery(grid_selector).jqGrid({
			url : grid_url,
		    shrinkToFit : true,
			colNames : _colnames,
			colModel : _colmodel, 
			jsonReader : {id :"id"},
			pager : pager_selector,
			postData : {sort : "id", order : "desc"}
		});
	}
</script>


	<!-- 配置 grid -->
	<div class="row">
		<div class="col-xs-12 tb-grid">
			<!-- 配置 查询 -->
			@ var _col=[
@		{name:"订单号", index:"id", type:"text"},
			@		{name:"用户ID", index:"u_id", type:"text"},
			@		{name:"用户名", index:"u_name", type:"text"},
			@		{name:"电话", index:"u_tel", type:"text"},
			@		{name:"取货地址", index:"address", type:"text"},
			@		{name:"购买数量", index:"num", type:"text"},
			@		{name:"订单金额", index:"total_fee", type:"text"},
			@		{name:"是否支付成功", index:"is_pay", type:"text"},
			@		{name:"创建时间", index:"addtime", type:"text"},
			@		{name:"支付成功时间", index:"pay_time", type:"text"},
			@		{name:"商品编号", index:"g_id", type:"text"},
			@		{name:"商品标题", index:"g_title", type:"text"},
			@		{name:"商品图片", index:"g_cover", type:"text"},
			@		{name:"状态1已下单2已付款3已收货", index:"status", type:"text"},
			@		{name:"取货时间", index:"quhuo_time", type:"text"},
			@		{name:"生产厂家", index:"g_industry", type:"text"},
			@		{name:"单价", index:"g_price", type:"text"}							
			@];
			@ include("/common/_function/_search.html",{"col":_col}){}
			<!-- 按钮 -->
			<div class="welljq well-sm" id="btns"></div>
			<!-- grid -->
			<table id="grid-table"></table>
			<!-- 分页-->
			<div id="grid-pager"></div>
		</div>
	</div>
	
	<!-- 引入所需的js -->
	@include("/common/_listscript.html"){}
	
@}	